package com.tanner.mapreducedemo.rpc;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;

import java.net.InetSocketAddress;

/**
 * @author zhang.t.c
 * @date 2021/7/25
 */
public class MyClient {
    public static void main(String[] args) {
        try {
            MyInterface proxy = RPC.getProxy(MyInterface.class, 1L,
                    new InetSocketAddress("127.0.0.1", 12345),
                    new Configuration());
            String name = proxy.findName("G20210735010309");
            System.out.println(name);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
